package com.yoga.manager.smsUtil;

import com.yoga.common.bo.SendSmsBO;
import com.yoga.common.bo.SmsSendRequest;
import com.yoga.common.enumcommon.SmsBusinessEnum;
import org.apache.commons.lang3.StringUtils;

/**
 * Created by chenjin on 2020/4/13.
 *
 * 创蓝验证码通知类短信配置
 */
public class NoticeAndCodeConfig extends BaseConfig {


    private static final String charset = "utf-8";

    private static String account = "N1065914";

    private static String password = "br3C1qcwe";

//    private static String autograph = "【梵景瑜伽】";
    private static String autograph = "【易兔生活】";
//    private static String autograph = "";


    private static String smsSingleRequestServerUrl = "http://smssh1.253.com/msg/send/json";


    public static SmsSendRequest getRequest(String phone, SmsBusinessEnum smsBusinessEnum, SendSmsBO sendSmsBO){
        String msg= getContent(smsBusinessEnum,sendSmsBO);
        if (StringUtils.isEmpty(msg)){
            return null;
        }
        SmsSendRequest smsSendRequest = new SmsSendRequest(account, password, autograph + msg, phone, report);
        smsSendRequest.setSmsSingleRequestServerUrl(smsSingleRequestServerUrl);
        return smsSendRequest;
    }
}
